package com.jeasonzhao.model;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(
    {ElementType.FIELD})
public @interface ModelField
{
    //Names: The name of this node.[Name,Name2,Name3]
    //JSON: only using the first name when inputing and outputing.
    //XML: using the first name when outputing, the others can be used when inputing.
    //Database: as the same way of JSON
    public String names() default "";
    //Is this folder is a collection node.
    public boolean collection()default false;
    //Component class,when collection()==true, this field will effected.
    public String component()default "";
    //XML: Is it a CDATA node?
    public boolean cdata()default false;
    //XML: Is it a node rather than a atrribute?
    public boolean forceNode()default false;
    //DB: is primary key
    public boolean primaryKey()default false;

    public String value() default "";
}
